const state = {
  sUser:'' //用户身份 admin:管理员，others:普通用户
  ,sHeaderTitle:'' // 头部header的标题
}
const getters = {
  sUser: (state) =>{
    return state.sUser;
  }
  ,sHeaderTitle: () => {
    return state.sHeaderTitle;
  }
}

const actions = {
  /**
   * 设置用户身份
   * @param commit
   * @param paramData
   * @returns {Promise}
   */
  // setSUser({commit},paramData){
  //   commit('setSUser',paramData)
  // }
}

const mutations = {
  setSUser(state,data){
    state.sUser = data;
  }
  ,setHeaderTitle(state,data){
    state.sHeaderTitle = data;
  }
}


export default {
  state,
  getters,
  actions,
  mutations
}
